<?php
namespace app\validate;

use share\validate\SceneValidate;

class MqttValidate extends SceneValidate{

    protected $rule = [
        'bind' =>  'require|boolean',
        'productKey' => 'require|length:6,60',
        'deviceName' => 'require|length:6,64',
        'iotId' => 'require|length:6,64',
        'region' => 'require|length:1,10',
        'messageCreateTime' => 'require|integer',
        // 'identityInfos' => 'require|array',
        'identityId' => 'require|length:6,64',
        'owned' => 'require|integer',
    ];  
    

    protected $scene = [
        'bindChange' => ['productKey','deviceName','iotId','region','messageCreateTime'],
        'relationUser' => ['identityId','owned'],
    ];
}